package com.hqyj.onlineExamination.modules.exam.service.impl;

import com.hqyj.onlineExamination.modules.common.entity.ResultEntity;
import com.hqyj.onlineExamination.modules.exam.dao.PaperQuestionDao;
import com.hqyj.onlineExamination.modules.exam.entity.PaperQuestion;
import com.hqyj.onlineExamination.modules.exam.service.PaperQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

@Service
public class PaperQuestionServiceImpl implements PaperQuestionService {

    @Autowired
    private PaperQuestionDao paperQuestionDao;

    @Override
    @Transactional
    public ResultEntity<PaperQuestion> addPaperQuestionByPaperQuestion(PaperQuestion paperQuestion) {
        paperQuestionDao.addPaperQuestionByPaperQuestion(paperQuestion);
        return new ResultEntity<PaperQuestion>(ResultEntity.ResultStatus.SUCCESS.status, "Insert success");
    }

}
